import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';
import { IonicStorageModule } from '@ionic/storage';
import { GlobalData } from '../global.data';
import { HttpModule } from '@angular/http';
import { BaHttp } from '../theme/baHttp/baHttp.service'


import { BarcodeScanner } from '@ionic-native/barcode-scanner';
import { QRCodeModule } from 'angular2-qrcode';
import { ButtonSelf } from '../pages/button/buttonself';
import { LoginPage } from '../pages/login/login';
import { AllApp } from '../pages/workspace/allApp/allApp';
import { SearchApp } from '../pages/workspace/searchApp/searchApp';
import { PersonPage } from '../pages/my/personPage/personPage';
import { MessagePage } from '../pages/message/message';
import { CasePage } from '../pages/case/case';
import { BarCodeSannerPage } from '../pages/case/barcodescanner/barcodescanner';
import { FormPage } from '../pages/case/form/form';
import { AddressListPage } from '../pages/case/addresslist/addresslist';
import { ReportFormPage } from '../pages/reportform/reportform';
import{ DataTime } from '../pages/datatime/datatime'
//列表声明
import { ListPage } from '../pages/case/list/list';
import { DividersPage } from '../pages/case/list/dividers/dividers';
import { IconPage } from '../pages/case/list/icon/icon';
import { AvatarPage } from '../pages/case/list/avatar/avatar';
import { ThumbnailPage } from '../pages/case/list/thumbnail/thumbnail';
import { SlidingPage } from '../pages/case/list/sliding/sliding'

import { WorkspacePage } from '../pages/workspace/workspace';
import { ContactPage } from '../pages/contact/contact';
import { MyPage } from '../pages/my/my';
import { QRCoderPage } from '../pages/my/qrcode/qrcode';
//商机管理
import { Business } from '../pages/workspace/business/business';
//添加商机
import { Addbusiness } from '../pages/workspace/addbusiness/addbusiness';
//搜索商机
import { SearchBusiness } from '../pages/workspace/searchBusiness/searchBusiness';
import { WelcomePage } from '../pages/welcome/welcome';
import { TabsPage } from '../pages/tabs/tabs';
import { MapPage } from '../pages/mappage/mappage';
import { TakePhoto } from '../pages/takephoto/takephoto';
import { SelectImage } from '../pages/selectimage/selectimage';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { Camera } from '@ionic-native/camera';
import { ImagePicker } from '@ionic-native/image-picker';
import { Contacts } from '@ionic-native/contacts';
@NgModule({
  declarations: [
    LoginPage,
    AllApp,
    SearchApp,
    Business,
    SearchBusiness,
    Addbusiness,
    PersonPage,
    ButtonSelf,
    MyApp,
    MessagePage,
    CasePage,
    WorkspacePage,
    ContactPage,
    MyPage,
    MapPage,
    TakePhoto,
    SelectImage,
    WelcomePage,
    TabsPage,
    BarCodeSannerPage,
    FormPage,
    ListPage,
    DividersPage,
    IconPage,
    AvatarPage,
    ThumbnailPage,
    SlidingPage,
    ReportFormPage,
    QRCoderPage,
    AddressListPage,
    DataTime
  ],
  imports: [
    BrowserModule,
    HttpModule,
    QRCodeModule,
    IonicModule.forRoot(MyApp,{
      backButtonText: '',
      iconMode: 'ios',
      mode: 'ios'
    }),
    IonicStorageModule.forRoot()
  ],
  bootstrap: [IonicApp],
  entryComponents: [
    LoginPage,
    AllApp,
    SearchApp,
    Business,
    SearchBusiness,
    Addbusiness,
    PersonPage,
    ButtonSelf,
    MyApp,
    MessagePage,
    CasePage,
    WorkspacePage,
    ContactPage,
    MyPage,
    MapPage,
    TakePhoto,
    SelectImage,
    WelcomePage,
    TabsPage,
    BarCodeSannerPage,
    FormPage,
    ListPage,
    DividersPage,
    IconPage,
    AvatarPage,
    ThumbnailPage,
    SlidingPage,
    ReportFormPage,
    QRCoderPage,
    AddressListPage,
    DataTime
  ],
  providers: [
    StatusBar,
    SplashScreen,
    Camera,
    ImagePicker,
    BarcodeScanner,
    GlobalData,
    BaHttp,
    Contacts,
    {provide: ErrorHandler, useClass: IonicErrorHandler}
  ]
})
export class AppModule {}
